<?php
echo form::open('admin/seminarWizard/next', array('id'=>'wizardForm'));
?>

<ul class="discountList">

    <!-- Early registration discount -->
    <li>
        <?php $blockName = 'earlyDiscount'; ?>
        <label>
            <?php echo form::checkbox($blockName . 'Enabled', sql::$TRUE, $discountForm[$blockName . 'Enabled'], 'onchange="toggleDiscountBlock(\'' . $blockName . 'Block\', this)"'); ?>
            <em class="textWithAction"><?php echo text::getEscaped('seminar.' . $blockName) ?></em>
        </label>
        <p class="description"><?php echo text::getEscaped('seminar.' . $blockName . '-desc') ?></p>

        <div id="<?php echo $blockName; ?>Block" class="<?php echo $discountForm[$blockName . 'Enabled'] == sql::$TRUE ? '' : 'hidden'; ?>">
            <table class="formTable">
                <tbody>
                    <tr>
                        <?php $inputFieldName = 'earlyDiscountAppliesToKarmayoga'; ?>
                        <th><label for="<?php echo $inputFieldName; ?>"><?php echo text::getEscaped('seminar.chargeAppliesToKarmayoga') ?></label></th>
                        <td><?php echo form::yesNoComboBox($inputFieldName, $discountForm[$inputFieldName]) ?></td>
                    </tr>
                    <tr>
                        <?php $inputFieldName = 'earlyDiscountPercentage'; ?>
                        <th><label for="<?php echo $inputFieldName; ?>"><?php echo text::getEscaped('seminar.earlyDiscountPercentage') ?></label></th>
                        <td><?php echo form::integer($inputFieldName, $discountForm[$inputFieldName]) ?> %</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </li>

    <!-- Discount for weak social groups -->
    <li>
        <?php $blockName = 'socialDiscount'; ?>
        <label>
            <?php echo form::checkbox($blockName . 'Enabled', sql::$TRUE, $discountForm[$blockName . 'Enabled'], 'onchange="toggleDiscountBlock(\'' . $blockName . 'Block\', this)"'); ?>
            <em class="textWithAction"><?php echo text::getEscaped('seminar.' . $blockName) ?></em>
        </label>
        <p class="description"><?php echo text::getEscaped('seminar.' . $blockName . '-desc') ?></p>

        <div id="<?php echo $blockName; ?>Block" class="<?php echo $discountForm[$blockName . 'Enabled'] == sql::$TRUE ? '' : 'hidden'; ?>">
            <table class="formTable">
                <tbody>
                    <tr>
                        <th><label for="socialBeforeDeadlineOnly"><?php echo text::getEscaped('seminar.discountBeforeDeadlineOnly') ?></label></th>
                        <td><?php echo form::yesNoComboBox('socialBeforeDeadlineOnly', $discountForm['socialBeforeDeadlineOnly']) ?></td>
                    </tr>
                    <tr>
                        <th><label for="socialAvailableForKarmayoga"><?php echo text::getEscaped('seminar.discountAvailableForKarmayoga') ?></label></th>
                        <td><?php echo form::yesNoComboBox('socialAvailableForKarmayoga', $discountForm['socialAvailableForKarmayoga']) ?></td>
                    </tr>
                    <tr>
                        <th><label for="socialPercentage"><?php echo text::getEscaped('seminar.discountHeightPercentage') ?></label></th>
                        <td><?php echo form::integer('socialPercentage', $discountForm['socialPercentage']) ?> %</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </li>
</ul>
</form>
